<template>
  <div class="HomeReco">
    <div class="row bg-info my-2 text-light py-1 text-center">
      <div class="col">
        <span>热血推荐</span>
      </div>
    </div>
    <!-- <router-link class="row mb-2" v-for="item of recoList" :key="item.id" :to="'/detail/'+item.id"> -->
    <router-link
      class="row mb-2"
      v-for="item of recoList"
      :key="item.id"
      :to="{name:'detailLink',params:{id:item.id,src:item.src,title:item.title}}"
    >
      <div class="col-6">
        <div class="card border-0">
          <img class="card-img-top" :src="item.src" alt="Card image cap" ref="img-src">
        </div>
      </div>
      <div class="col-6">
        <p class="m-0">{{item.title}}</p>
        <p class="text-muted txt-ellipsis m-0">{{item.desc}}</p>
        <p class="mt-2">
          <span class="text-warning font-weight-bold">&#65509;{{item.price}}</span>起
        </p>
      </div>
    </router-link>
  </div>
</template>

<script>
export default {
  name: "HomeReco",
  props: {
    recoList: {
      type: Array,
      required: true
    }
  },
  data() {
    return {};
  }
};
</script>


<style scoped>
/* @import "../../assets/css/mixins.styl"  */
.head-wrap {
  height: 2.4rem;
}
.search-icon {
  position: absolute;
  top: 0rem;
  left: 1rem;
}
.search-icon span {
  display: block;
  height: 1.8rem;
  line-height: 1.8rem;
}

.search-input {
  border: none;
  outline: none;
  padding-left: 1.8rem;
  height: 1.8rem;
  line-height: 1.8rem;
}
</style>
